package ${sourceBasePackage}.api.${entityPackage?uncap_first};

import ${sourceBasePackage}.common.api.JsonResult;
import ${sourceBasePackage}.common.entity.${className};
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("zoo-${entityPackage?uncap_first}")
public interface ${className}Service {
	@GetMapping("${entityPackage?uncap_first}")
	JsonResult<${className}> list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "rows", required = false) Integer rows) throws Exception;

	@GetMapping("${entityPackage?uncap_first}/{${pkField}}")
	JsonResult<${className}> info(@PathVariable(value="${pkField}") Integer ${pkField}) throws Exception;

	@PostMapping("${entityPackage?uncap_first}")
	JsonResult<${className}> add(@RequestBody ${className} ${className?uncap_first}) throws Exception;

	@PutMapping("${entityPackage?uncap_first}/{${pkField}}")
	JsonResult<${className}> update(@PathVariable(value="${pkField}") Integer ${pkField}, @RequestBody ${className} ${className?uncap_first}) throws Exception;

	@DeleteMapping("${entityPackage?uncap_first}/{${pkField}}")
	JsonResult<${className}> delete(@PathVariable(value="${pkField}") Integer ${pkField}) throws Exception;
}
